import React, { useRef, useEffect } from "react";
import * as echarts from "echarts";
import AppTitle from "../../../../../components/AppTitle"
import { onRightUpOption } from "./data";

import "./index.less";

const App = () => {

  const chartRef = useRef(null);

  useEffect(() => {
    const myChart = info();
    return () => {
      myChart && myChart.dispose()
    }
  }, [])

  const info = () => {
    const myChart = echarts.init(chartRef.current)
    const options = onRightUpOption();
    myChart.setOption(options, true)
    return myChart
  }

  return (
    <div className="right-down">
      <AppTitle title="医疗人力资源"  /> 
      <div style={{ height: 205 }} ref={chartRef} />
    </div>
  );
}

export default App;


